Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libcperciva import and fix lbs test #293

Merged
merged 4 commits into from
Jan 12, 2024
Merged

libcperciva import and fix lbs test #293

merged 4 commits into from
Jan 12, 2024

Conversation

gperciva
Copy link
Member

@gperciva gperciva commented Jan 2, 2024

No description provided.

dorjoy03 and others added 4 commits January 1, 2024 19:30
In the case of modulo wrapping of nsize * 4, the else if block could be
taken even though EA->alloc is not really greater than nsize * 4.  This
can lead to nalloc becoming smaller than nsize, which will result in the
buffer to be reallocated to be smaller than the desired nsize.
This commit adds a comment describing the cases handled by the
if (nalloc < nsize) block.  One such case is the potential wrap
around of EA->alloc * 2.  Without the comment, it was not clear
that the wrap around is properly handled.
@cperciva cperciva merged commit 157ee5f into master Jan 12, 2024
2 checks passed
@gperciva gperciva deleted the fix-lbs-test branch January 12, 2024 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants